When two programs both need access to some shared data, how do we ensure that they don’t try to manipulate the data at the same time? This is the mutual exclusion problem, and it’s often solved with hardware. But even without any special hardware, Dekker’s Algorithm offers a way to ensure that programs can only access the shared data one at a time. Here, we take a visual look at Dekker’s Algorithm: what’s the intuition behind it? How does it work? And why does it prevent race conditions? 0:00 Mutual Exclusion 2:24 Signaling 4:05 Dekker’s Algorithm *** Spanning Tree is an educational video series about computer science and mathematics. See more at https://spanningtree.me To be notified when a new video is released, sign up for the Spanning Tree mailing list at https://spanningtree.substack.com/ Spanning Tree is created by Brian Yu. https://brianyu.me/ Email me at brian@spanningtree.me to suggest a future topic.